package com.zy.web.demo.suanfa.recursive;

/**
 * @author zy
 * @version 1.0
 * @date 2021/3/4 22:56
 * 递归100！
 */
public class Recursive {

    public static void main(String[] args) {
        System.out.println( sum(100) );

    }

    public static int sum(int number){
        if ( number ==1 ){
            return 1;
        }else {
            return number+sum(number-1);
        }
    }

}
